package com.ming.mallchat.common.common.exception;

import lombok.Data;

/**
 * @author 86150
 * @date 2023/10/04
 */
@Data
public class BusinessException extends RuntimeException {

    private Integer errorCode;

    private String errorMsg;

    public BusinessException(String msg){
        this.errorCode = CommonErrorEnum.BUSINESS_ERROR.getErrorCode();
        this.errorMsg = msg;
    }

    public BusinessException(Integer code,String msg){
        this.errorCode = code;
        this.errorMsg = msg;
    }

}
